/**
 * Created by Administrator on 2017/10/17.
 */


//连接mongoose模块
var mongoose = require('mongoose');
//连接分页插件
var mongoosePaginate = require('mongoose-paginate')
var schema= new mongoose.Schema({//调用模块方法,建立数据模型
    name:String,
    author:String,
    data:{type:Date,default:Date.now}
});

schema.plugin(mongoosePaginate);//调用分页插件,

var News=mongoose.model("News",schema,"news");

module.exports=News;






